<?php
class ServiceOrderRowState extends AppModel {
	var $belongsTo = array( 'ServiceOrderRow', 'State');
	var $hasMany =  array('ServiceOrderRowState' =>
			array(
					'finderQuery' => 'SELECT * FROM service_order_row_states AS ServiceOrderRowState JOIN states ON states.id = ServiceOrderRowState.state_id WHERE ServiceOrderRowState.service_order_row_id  IN ({$__cakeID__$}) ORDER BY ServiceOrderRowState.id DESC'
					)
			);
    
}

?>